package neusoft.yuejian_11.interF;


import java.util.List;

import neusoft.yuejian_11.bean.ActivitynInBean;
import neusoft.yuejian_11.bean.AddPrize;
import neusoft.yuejian_11.bean.AddfeedBean;
import neusoft.yuejian_11.bean.AddpostBean;
import neusoft.yuejian_11.bean.ClubBean;
import neusoft.yuejian_11.bean.ClubInformBean;
import neusoft.yuejian_11.bean.CommentBean;
import neusoft.yuejian_11.bean.CourseBean;
import neusoft.yuejian_11.bean.DuijiangBean;
import neusoft.yuejian_11.bean.EventBean;
import neusoft.yuejian_11.bean.EventnBean;
import neusoft.yuejian_11.bean.GetInfo;
import neusoft.yuejian_11.bean.InformBean;
import neusoft.yuejian_11.bean.IsAddPrize;
import neusoft.yuejian_11.bean.IsAttentionBean;
import neusoft.yuejian_11.bean.IsEventn;
import neusoft.yuejian_11.bean.IsMatchn;
import neusoft.yuejian_11.bean.IsTrainn;
import neusoft.yuejian_11.bean.MCourseBean;
import neusoft.yuejian_11.bean.MasterBean;
import neusoft.yuejian_11.bean.MasterVideoBean;
import neusoft.yuejian_11.bean.MatchBean;
import neusoft.yuejian_11.bean.MatchnBean;
import neusoft.yuejian_11.bean.MatchnInBean;
import neusoft.yuejian_11.bean.PostBean;
import neusoft.yuejian_11.bean.PrizeBean;
import neusoft.yuejian_11.bean.RegBean;
import neusoft.yuejian_11.bean.SampleInfo;
import neusoft.yuejian_11.bean.SampleLogin;
import neusoft.yuejian_11.bean.TrainBean;
import neusoft.yuejian_11.bean.TrainnBean;
import neusoft.yuejian_11.bean.TrainnInBean;
import neusoft.yuejian_11.bean.VideoBean;
import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by NEUSOFT on 2017/9/26.
 */

public interface RetrofitService {
    //登录
    @GET("User/login")
    Call<SampleLogin> getUserLogin(@Query("u_name") String editTextUser,
                                   @Query("u_pass") String editTextPass);

    //注册
    @GET("User/reg")
    Call<RegBean> getuserRegister(@Query("u_name") String userName,
                                  @Query("u_pass") String password1R,
                                  @Query("u_phone") String userPhone,
                                  @Query("u_email") String userEmail,
                                  @Query("u_address") String userAddress);


    //获取所有帖子信息接口
    @GET("Post/getPostlist")
    Call<List<PostBean>>         getPostlist();
    //获取帖子详情接口
    @GET("Post/getPostDetail")
    Call<PostBean>     getPostById(@Query("p_id") String postId);

    //获取某个俱乐部帖子接口
    @GET("Post/getCpostlist")
    Call<List<PostBean>>     getCPost(@Query("c_id") String clubId);
    //获取我的信息
    @GET("User/getUserInfo")
    Call<GetInfo> getUserInfo(@Query("u_id") int u_id);
    //修改我的信息
    @GET("User/updateuser")
    Call<SampleInfo>  updateUserById(@Query("u_id") int u_id,
                                     @Query("u_name") String u_name,
                                     @Query("u_pass") String u_pass,
                                     @Query("u_phone") String u_phone,
                                     @Query("u_address") String u_address,
                                     @Query("u_email") String u_email
    );
    //获取奖品列表接口
    @GET("User/getGiftlist")
    Call<List<PrizeBean>>         getPrizelist();
    //获取奖品详情接口
    @GET("User/getGiftDetail")
    Call<PrizeBean>     getPrizeById(@Query("g_id") String giftId);
    //获取系统通知接口
    @GET("User/getInformlist")
    Call<List<InformBean>>         getInformlist();
    //获取俱乐部通知接口
    @GET("User/getCInformlist")
    Call<List<ClubInformBean>>         getCInformlist();
    //获取我的帖子列表
    @GET("User/getMypostlist")
    Call<List<PostBean>>     getMyPost(@Query("u_id") int u_id

    );
    //获取我的兑奖列表
    @GET("User/getMyduijiangList")
    Call<List<DuijiangBean>>     getMyDuijiang(@Query("u_id") int u_id

    );
    //添加反馈信息
    @GET("User/addfeedback")
    Call<AddfeedBean>     addfeedback(@Query("u_id") int u_id,
                                      @Query("f_userphone") String f_userphone,
                                      @Query("f_info") String f_info
    );

    //判断是否兑换过奖品
    @GET("User/getIsAddPrize")
    Call<IsAddPrize> IsAddPrize(@Query("u_id") String u_id,
                                 @Query("g_id") String g_id);
    //添加兑奖记录
    @GET("User/addDuiJiang")
    Call<AddPrize>                  addprize(@Query("u_id") int u_id,
                                             @Query("g_id") String giftId
    );
    //获取某条帖子的评论
    @GET("Post/getPostComment")
    Call<List<CommentBean>>     getCommentPost(@Query("p_id") String postId);
    //添加评论
    @GET("Post/addcomment")
    Call<AddPrize>                  addcomment(@Query("u_id") int u_id,
                                               @Query("p_id") String postId,
                                               @Query("co_info") String co_info
    );


    //俱乐部列表
    @GET("Club/getClublist")
    Call<List<ClubBean>> getAllClubs();
    //俱乐部详情
    @GET("Club/getClubDetail")
    Call<ClubBean> getClubById(@Query("c_id") String clubId);
    //俱乐部课程列表
    @GET("Clubcourse/getClubcourselist")
    Call<List<CourseBean>> getCourseByClub(@Query("c_id") String clubId);
    //俱乐部视频列表
    @GET("Clubvideo/getClubvideolist")
    Call<List<VideoBean>> getVideoByClub(@Query("c_id") String ClubId);
    //搜索俱乐部
    @GET("Club/getClubSearchlist")
    Call<List<ClubBean>> getClubBySearch(@Query("c_name") String clubName);

    //培训列表
    @GET("Train/getTrainlist")
    Call<List<TrainBean>> getAllTrains();
    //培训详情
    @GET("Train/getTrainDetail")
    Call<TrainBean> getTrainById(@Query("t_id") String trainId);
    //搜索培训
    @GET("Train/getTrainSearchlist")
    Call<List<TrainBean>> getTrainBySearch(@Query("t_name") String trainName);
    //培训报名培训
    @GET("Train/addTrainRegistration")
    Call<TrainnBean> getTrainnById(@Query("u_id") int userId,
                                   @Query("t_id") int trainId);
    //判断是否报名
    @GET("Train/getIsAddTrain")
    Call<IsTrainn> IsAddTrainn(@Query("u_id") int u_id,
                               @Query("t_id") String t_id);
    //获取培训报名列表
    @GET("Train/getTrainRegistration")
    Call<List<TrainnInBean>> getTrainReg(@Query("u_id") int userId);

    //入门培训列表
    @GET("Train/getRumenTrainlist")
    Call<List<TrainBean>> getRumenTrains();
    //菜鸟培训列表
    @GET("Train/getCainiaoTrainlist")
    Call<List<TrainBean>> getCainiaoTrains();
    //进阶培训列表
    @GET("Train/getJinjieTrainlist")
    Call<List<TrainBean>> getJinjieTrains();
    //高级培训列表
    @GET("Train/getGaojiTrainlist")
    Call<List<TrainBean>> getgaojiTrains();

    //活动列表
    @GET("Activity/getActivitylist")
    Call<List<EventBean>> getAllEvents();
    //活动详情
    @GET("Activity/getActivityDetail")
    Call<EventBean> getEventById(@Query("a_id") String activityId);
    //活动报名
    @GET("Activity/addActivityRegistration")
    Call<EventnBean> getEventnById(@Query("u_id") int userId,
                                   @Query("a_id") int trainId);
    //判断是否报名
    @GET("Activity/getIsAddActivityn")
    Call<IsEventn> IsAddActivityn(@Query("u_id") int u_id,
                                  @Query("a_id") String a_id);
    //获取活动报名列表
    @GET("Activity/getActivityRegistration")
    Call<List<ActivitynInBean>> getActivityReg(@Query("u_id") int userId);

    //大师列表
    @GET("Professor/getPmlist")
    Call<List<MasterBean>> getAllMasters();
    //大师详情
    @GET("Professor/getPmdetail")
    Call<MasterBean> getMasterById(@Query("pm_id") String masterId);
    //大师课程列表
    @GET("ProfessorCourse/getPclist")
    Call<List<MCourseBean>> getMcourseByMaster(@Query("pm_id") String masterId);
    //播放大师视频
    @GET("Mastervideo/getMastervideolist")
    Call<List<MasterVideoBean>> getMasterVideos(@Query("pm_id") String masterId);

    //比赛列表
    @GET("Match/getMatchlist")
    Call<List<MatchBean>> getAllMatches();
    //比赛详情
    @GET("Match/getMatchDetail")
    Call<MatchBean> getMatchById(@Query("m_id") String matchId);
    //比赛报名
    @GET("Match/addMatchRegistration")
    Call<MatchnBean> getMatchnById(@Query("u_id") int userId,
                                   @Query("m_id") int matchId);
    //判断是否报名
    @GET("Match/getIsAddMatch")
    Call<IsMatchn> IsAddMatchn(@Query("u_id") int u_id,
                               @Query("m_id") String m_id);
    //获取比赛报名列表
    @GET("Match/getMatchRegistration")
    Call<List<MatchnInBean>> getMatchReg(@Query("u_id") int userId);

    //搜索晒图
    @GET("Post/getPostSearchlist")
    Call<List<PostBean>> getPostBySearch(@Query("p_title") String p_title);
    //上传晒图
    @Multipart
    @POST("Post/addpost")
    Call<AddpostBean> addpost(
            @Part("u_id") int u_id,
            @Part("p_info") String p_info,
            @Part MultipartBody.Part file
    );
    //修改用户头像
    @Multipart
    @POST("User/updatetouxiang")
    Call<AddpostBean> updatetouxiang(
            @Part("u_id") int u_id,
            @Part MultipartBody.Part file
    );
}
